<template>
	<view>
		<view class="aboutOur" style="display: flex;flex-direction: column;align-items: center;">
			<view style=" box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.05); 
			border-radius: 1.6vw;width: 94.66vw;height: 12vw;
			 display: flex;
			 margin-top: 2.13vw;
			 justify-content: space-between;
			 align-items: center;
			 " class="list" v-for="(item,i) in aboutList" :key="item.id" @tap="toDetails(item)">
			 <view>	
				<view class="cu-avatar round" :style="{backgroundImage: 'url('+ $wanlshop.oss(item.icon) +')'}"></view>	
				<text style="color: #3D3D3D; font-size: 3.73vw; margin-left: 4.266vw; ">{{item.title}}</text>
			</view>	
				<image style=" margin-right: 4.266vw; width: 1.6vw; height: 3.2vw;"
					src="../../../static/images/user/right.png" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				aboutList: []
			}
		},
		onLoad(options) {
			// console.log('loadList', options)
			this.loadList();
		},
		methods: {
			// 加载列表
			async loadList() {
				this.$api.post({
					url: '/wanlshop/article/getList',
					data: {
						category: '使用协议'
					},
					success: res => {
						this.aboutList = res.data;
					}
				})
			},

			// 查看详情
			toDetails(data) {
				console.log('data', data)
				uni.navigateTo({
					url: './agreement',
					success: (res) => {
						res.eventChannel.emit('agreementData', data);
					}
				})
			},
		}
	}
</script>

<style>

</style>